import requests

def stream_reponse(url):
    resp = requests.get(url, stream=True)
    for line in resp.iter_content(chunk_size=1, decode_unicode=True):
        print(line, end="", flush=True)
    print("")

if __name__ == '__main__':
    url = "http://127.0.0.1:8000/stream"
    stream_reponse(url)